<?php /* Smarty version 2.6.16, created on 2007-05-16 23:38:54
         compiled from /home/.batly/roamzero/Framework/Site/Peopletab/Templates/Default/templates/CP/ListMessages.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'truncate', '/home/.batly/roamzero/Framework/Site/Peopletab/Templates/Default/templates/CP/ListMessages.tpl', 72, false),array('modifier', 'date_format', '/home/.batly/roamzero/Framework/Site/Peopletab/Templates/Default/templates/CP/ListMessages.tpl', 77, false),)), $this); ?>
<div id="subNav">
<?php echo $this->_tpl_vars['msgNav']; ?>

</div>
<?php echo '
<script>
$(document).ready(function(){
    $(".newMessageButton").unbind().bind("click", function(){Peopletab.modal.initModal(
		{modal: false, 
		 width: 500, 
		 height: 450,
		 modalID: "newMessage",
		 ajax: $(this).attr("href")}
	); return false});
		
	$(".newMessageLink").unbind().bind("click", function(){Peopletab.modal.initModal(
		{modal: false, 
		 width: 500, 
		 height: 450,
		 modalID: $(this).attr("id"),
		 ajax: $(this).attr("href")}
	); return false});
});
</script>
'; ?>

<?php if ($this->_tpl_vars['errors']): ?>
<div id="errors">
<?php $_from = $this->_tpl_vars['errors']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['error']):
?>
<span class="error"><?php echo $this->_tpl_vars['error']; ?>
</span><br>
<?php endforeach; endif; unset($_from); ?>
</div>
<?php endif; ?>

<?php if ($this->_tpl_vars['formResponse']): ?>
<div id="formResponse"><?php echo $this->_tpl_vars['formResponse']; ?>
</div>
<?php endif; ?>

<?php if ($this->_tpl_vars['pager']->links): ?>
<div class="pager">
<?php echo $this->_tpl_vars['pager']->links; ?>

</div>
<?php endif; ?>

<div class="blockCP">
<form <?php echo $this->_tpl_vars['form']['attributes']; ?>
>
<table border="0" id="cpMessageTable" class="cpTable" width="100%">
<tr>
<td colspan="3" valign="middle" align="left"><?php echo $this->_tpl_vars['form']['btnSubmit']['html']; ?>
</td>
<td valign="middle" align="right" width="24%"><span class="button"><a href="/<?php echo $this->_tpl_vars['request']->ownerName; ?>
/CP/Messages/new" class="newMessageButton">New Message</a></span></td>
</tr>
<?php if ($this->_tpl_vars['noResults']): ?>
<tr>
<td colspan="4" valign="top" align="left"><p class="block"><?php echo $this->_tpl_vars['noResults']; ?>
</p></td>
</tr>
<?php else: ?>
<tr class="cpTableHeader">
<td>
</td>
<td>
Title	
</td>
<td>
From
</td>
<td>
Date
</td>
</tr>
<?php $_from = $this->_tpl_vars['messages']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['message']):
?>
<tr valign="top" class="cpTableRow">
<td><?php echo $this->_tpl_vars['form'][$this->_tpl_vars['message']['idPrivateMsg']]['html']; ?>
</td>
<?php if ($this->_tpl_vars['message']['readStatus'] == '1'): ?>
<td><a href="/<?php echo $this->_tpl_vars['request']->ownerName; ?>
/CP/Messages/read<?php echo $this->_tpl_vars['sent']; ?>
/<?php echo $this->_tpl_vars['message']['idPrivateMsg']; ?>
" id="message<?php echo $this->_tpl_vars['message']['idPrivateMsg']; ?>
" onclick="Peopletab.readMessage(<?php echo $this->_tpl_vars['message']['idPrivateMsg']; ?>
); return false"><?php echo ((is_array($_tmp=$this->_tpl_vars['message']['messageTitle'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 75, "...", true) : smarty_modifier_truncate($_tmp, 75, "...", true)); ?>
</a></td>
<?php else: ?>
<td><b><a href="/<?php echo $this->_tpl_vars['request']->ownerName; ?>
/CP/Messages/read<?php echo $this->_tpl_vars['sent']; ?>
/<?php echo $this->_tpl_vars['message']['idPrivateMsg']; ?>
" id="message<?php echo $this->_tpl_vars['message']['idPrivateMsg']; ?>
" onclick="Peopletab.readMessage(<?php echo $this->_tpl_vars['message']['idPrivateMsg']; ?>
); return false"><?php echo ((is_array($_tmp=$this->_tpl_vars['message']['messageTitle'])) ? $this->_run_mod_handler('truncate', true, $_tmp, 75, "...", true) : smarty_modifier_truncate($_tmp, 75, "...", true)); ?>
</a></b></td>
<?php endif; ?>
<td><a href="http://<?php echo $this->_tpl_vars['message']['domain']; ?>
/<?php echo $this->_tpl_vars['message']['userName']; ?>
"><?php echo $this->_tpl_vars['message']['userName']; ?>
@<?php echo $this->_tpl_vars['message']['domain']; ?>
</a></td>
<td><?php echo ((is_array($_tmp=$this->_tpl_vars['message']['timeSent'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%D %I:%M %p") : smarty_modifier_date_format($_tmp, "%D %I:%M %p")); ?>
</td>
</tr>
<?php endforeach; endif; unset($_from); ?>
<?php endif; ?>
<tr>
<td colspan="3" valign="top" align="left"><?php echo $this->_tpl_vars['form']['btnSubmit']['html']; ?>
</td>
<td valign="middle" align="right"><span class="button"><a href="/<?php echo $this->_tpl_vars['request']->ownerName; ?>
/CP/Messages/new" class="newMessageButton">New Message</a></span></td>
</tr>
</table>
</form>
</div>

<?php if ($this->_tpl_vars['pager']->links): ?>
<div class="pager">
<?php echo $this->_tpl_vars['pager']->links; ?>

</div>
<?php endif; ?>
